///////////////////////////////////////////////////////////////////////////////
//Programmers: Connor Moelmann
//             Corwin Stout
//             John Ustick
//Purpose: Make the game of monopoly
///////////////////////////////////////////////////////////////////////////////

#include <iostream>
#include <string>
#include "Const.h"
#include "RandomNumber.h"
#include "PlayerClass.h"
#include "SpaceClass.h"
#include "functions.cpp"
#include <list>
using namespace std;


int main()
{
  cout << endl << endl << "Welcome to Monopoly!" << endl;
  int numPlayers;
  bool freeParking;
  bool snakeEyes;
  bool landOnGo;
  int numHuman;
  mainMenu(freeParking, snakeEyes, landOnGo, numPlayers, numHuman);

  //set up game
  list<PlayerClass> players;
  setPlayers(numPlayers, numHuman, players);
  SpaceClass *board = setUpBoard(freeParking);

  //begin the game
  int remainingPlayers = numPlayers;
  int playerTurn = 0;
  int dice;
  int restriction = 100;
  
  list<PlayerClass>::iterator player_iterator;
  player_iterator = players.begin();

  while (remainingPlayers > 1 && restriction-- > 0)
  {
    player_iterator->takeTurn(board);

    player_iterator++;
    if (player_iterator == players.end())
    {  
      player_iterator = players.begin();
    }
  }
  
  return 0;
}
